package no.uio.ifi.cop.cl;

import java.util.Set;

/**
 * An abstract class extended by Conjunction and RHS.
 *
 * @version 1.0
 * @author bjarneh@ifi.uio.no
 */


public abstract class Formula{

    public static final int NOTSET        = 0;
    public static final int CONSTANT      = 1;
    public static final int DISJUNCTION   = 2;
    public static final int CONJUNCTION   = 3;

    protected int type;

    public Formula(){
        type = NOTSET;
    }

    public int getType(){
        if(type == NOTSET){
            classify();
        }
        return type;
    }

    public abstract void classify();
    public abstract void gatherVariables(Set<String> set);
}
